package top.tangyh.lamp.care.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.github.pagehelper.util.StringUtil;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import top.tangyh.lamp.care.mapper.BHl7RouteMapper;
import top.tangyh.lamp.care.service.BHl7RouteService;
import top.tangyh.basic.base.service.impl.SuperServiceImpl;
import top.tangyh.lamp.care.manager.BHl7RouteManager;
import top.tangyh.lamp.care.entity.BHl7Route;
import top.tangyh.lamp.care.vo.query.ListRouteQueryVO;
import top.tangyh.lamp.care.vo.save.BHl7RouteSaveVO;
import top.tangyh.lamp.care.vo.update.BHl7RouteUpdateVO;
import top.tangyh.lamp.care.vo.result.BHl7RouteResultVO;
import top.tangyh.lamp.care.vo.query.BHl7RoutePageQuery;

import java.util.List;

/**
 * <p>
 * 业务实现类
 * 给药方式字典表
 * </p>
 *
 * @author zqb
 * @date 2024-08-09 16:13:14
 * @create [2024-08-09 16:13:14] [zqb] [代码生成器生成]
 */
@Slf4j
@RequiredArgsConstructor
@Service
@Transactional(readOnly = true)
public class BHl7RouteServiceImpl extends SuperServiceImpl<BHl7RouteManager, Long, BHl7Route> implements BHl7RouteService {

    private final BHl7RouteMapper bHl7RouteMapper;
    @Override
    public List<BHl7Route> selectRouteListByQuery(ListRouteQueryVO queryInVO) {
        QueryWrapper<BHl7Route> queryWrapper = new QueryWrapper<>();
        queryWrapper.like(StringUtil.isNotEmpty(queryInVO.getRouteName()),"route_name",queryInVO.getRouteName());
        List<BHl7Route> result = bHl7RouteMapper.selectList(queryWrapper);
        return result;
    }
}


